﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Kaidou.Model;
using Kaidou.Persister;
using Kaidou.Util;
using Kaidou.Bll;
using System.Collections.Generic;
using System.Globalization;

public partial class seal_seal_revoke_conf : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginModel loginModel = (LoginModel)Session["loginModel"];

        if (loginModel == null)
        {
            Response.Redirect("../login.aspx");
            return;
        }

        if (loginModel.isKumiaiin() && sessioncontrol.control())
        {
            Response.Redirect("../control.aspx");
        }
    }

    protected void login_confirm(object sender, EventArgs e)
    {
        LoginModel loginModel = (LoginModel)Session["loginModel"];

        TrnPurchSeal_a model = (TrnPurchSeal_a)Session["CANCELED_SEAL"];
        //パーシスターを作成
        TRN_Purch_SealPersister per = new TRN_Purch_SealPersister();

        model.UpdDate = System.DateTime.Now;
        model.UpdUnionCode = loginModel.Unioncode;
        model.UpdBranchCode = (short)loginModel.Branchcode;
        model.UpdFuncId = "revokePurch_seal()";

        try
        {
            per.revoke_Seal(new SqlDB(), model);
            Response.Redirect("seal_revoke_comp.aspx");

        }
        catch (Exception exx)
        {
            LogManager.error("seal_seal_revoke_conf login_confirm " + exx.Message + exx.StackTrace);
        }


    }
    
}
